import typescript from 'rollup-plugin-typescript2';
import { nodeResolve } from '@rollup/plugin-node-resolve';

export default {
  input: 'src/index.ts',
  output: [
    {
      file: './dist/r-hooks-vue3.esm.js',
      format: 'esm'
    },
    {
      file: './dist/r-hooks-vue3.cjs.js',
      format: 'cjs'
    }
  ],
  plugins: [
    nodeResolve(),
    typescript({
      tsconfig: './tsconfig.json'
    })
  ],
  external: ['vue'] // 排除 vue 打包
};